<html>
<head>
<title> 用CSS定位元素</title>
</head>
<body>
<div style="position:static;width:300px;height:200px;background-color:yellow; z-index: 0;">static</div>
<div style="position:absolute;top:10px;left:10px;width:100px;height:100px;background-color:blue;">absolute</div>
<div style="position:absolute;top:25%;left:25%;width:50%;height:50%;border:2px solid black">absolute</div>
<div style="position:fixed;top:10px;right:10px;width:50%;height:50%;border:2px solid red">fixed</div>
<div style="position:relative;top:300px;right:10px;width:50%;height:50%;border:2px solid green">relative</div>
</body>
</html>